package com.diy.sigmund.diycommon.designpatterns.composite;

/**
 * @author ylm-sigmund
 * @since 2022/2/14 17:31
 */
public class MenuTestDrive {

    public static void main(String[] args) {
        MenuComponent dinnerMenu = new Menu("DINNER MENU", "Lunch");
        MenuComponent cafeMenu = new Menu("CAFE MENU", "Dinner");
        MenuComponent dessertMenu = new Menu("DESSERT MENU", "Dessert of course!");

        MenuComponent allMenus = new Menu("ALL MENUS", "All menus combined");

        allMenus.add(dinnerMenu);
        allMenus.add(cafeMenu);

        dinnerMenu.add(new MenuItem("Pasta", "Pasta", true, 3.89));

        dinnerMenu.add(dessertMenu);

        dessertMenu.add(new MenuItem("Apple pie", "Apple pie", true, 1.59));

        Waitress waitress = new Waitress(allMenus);

        // waitress.printMenu();

        waitress.printVegetarianMenu();

    }

}
